import Vue from 'vue'
import {AlertPlugin, ToastPlugin, LoadingPlugin, ConfirmPlugin, TransferDom} from 'vux'
import {ConfigPlugin} from 'vux'
import MeScroller from '../../components/scroller/mescroller'
import ViewHeader from '../../components/headTop/ViewHeader'

import {
  Group,
  CellBox,
  Cell,
  Flexbox,
  FlexboxItem,
  Grid,
  GridItem,
  Card,
  Divider,
  LoadMore,
  Scroller,
  XInput,
  XButton,
  Selector,
  Loading,
  ViewBox,
  Datetime,
  Popup,
  DatetimeView,
  XAddress,
  XTextarea
} from 'vux'

Vue.directive('transfer-dom', TransferDom)

Vue.component('group', Group)
Vue.component('cell', Cell)
Vue.component('cellBox', CellBox)
Vue.component('flexbox', Flexbox)
Vue.component('flexboxItem', FlexboxItem)
Vue.component('grid', Grid)
Vue.component('gridItem', GridItem)
Vue.component('card', Card)
Vue.component('divider', Divider)
Vue.component('load-more', LoadMore)
Vue.component('scroller', Scroller)
Vue.component('x-input', XInput)
Vue.component('x-button', XButton)
Vue.component('selector', Selector)
Vue.component('loading', Loading)
Vue.component('view-box', ViewBox)
Vue.component('me-scroller', MeScroller)
Vue.component('view-header', ViewHeader)
Vue.component('datetime', Datetime)
Vue.component('popup', Popup)
Vue.component('datetime-view', DatetimeView)
Vue.component('x-address', XAddress)
Vue.component('x-textarea', XTextarea)
Vue.use(AlertPlugin)
Vue.use(ToastPlugin)
Vue.use(LoadingPlugin)
Vue.use(ConfirmPlugin)
Vue.use(ConfigPlugin, {
  $layout: 'VIEW_BOX'
})
